SharePointPackageStore.RegisterPackage Method

Registers a package with the SharePointPackageStore. Any changes to the original file after the package is registered are not reflected in the store.

Parent Type: SharePointPackageStore

Namespace: Microsoft.LearningComponents.SharePoint

Assembly: Microsoft.LearningComponents.SharePoint.dll

Syntax
C#

public RegisterPackageResult RegisterPackage (
SharePointFileLocation packageLocation,
PackageEnforcement packageEnforcement

)

Parameters

packageLocation

The location of the package to be registered.

packageEnforcement

The settings to determine whether the package should be modified to allow it to be added to the store.

Return Value

The results of adding the package, including a log of any warnings or errors that occurred in the process.

Exceptions
Exception type Condition
PackageImportException

Thrown if the package could not be registered with the store. The exception may include a log indicating a cause for the failure.

Remarks

The package is read from SharePoint under elevated privileges. The current user does not need access to the package in order to register it. However, the current user does need to have permission to add a package to LearningStore in order to register it.